<!doctype html>
<html>

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
        <title>title</title>
        <link rel="stylesheet" type="text/css" href="../css/api.css" />
        <style type="text/css">
            html,
            body {
                height: 100%;
                background-color: transparent;
            }
            
            .skip {
                width: 68px;
                height: 28px;
                line-height: 28px;
                font-size: 12px;
                color: #fff;
                text-align: center;
                position: absolute;
                top: 31px;
                right: 14px;
                border-radius: 16px;
                background-color: rgba(0, 45, 105, 0.4);
            }
        </style>
    </head>

    <body>
        <div class="skip" onclick="fnSkip()">跳过广告</div>
    </body>
    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript">
        apiready = function() {
            fnInitKeyback();
            fnTime();
            api.removeLaunchView();
        };

        function fnInitKeyback() {
            api.addEventListener({
                name: 'keyback'
            }, function(ret, err) {
                return;
            });
        };

        function fnTime() {
            setTimeout(fnSkip, 3000);
        };

        function fnSkip() {
            api.closeWin({
                name: 'ad',
                animation: {
                    type: 'fade'
                }
            });
        };
    </script>

</html>
